#ifndef HISTORY_H
#define HISTORY_H

#include <QObject>
#include <QAction>
#include "docentity.h"

class History: public QObject
{
    Q_OBJECT
public:
    History(QObject* parent=0);
    QAction* back();
    QAction* forward();
    void setMaxSize(const int&maxSize);
private:
    QList<DocEntity*> m_history;
    QAction* m_back, *m_forward;
    int m_current;
    int m_maxSize;
public slots:
    void setCurrent(DocEntity*item);
    void clear();
private slots:
    void goBack();
    void goForward();
signals:
    void itemChange(DocEntity* item);
};

#endif // HISTORY_H
